package com.example.crt_dispatching_center.controller;

import com.example.crt_dispatching_center.entity.FlowDaily;
import com.example.crt_dispatching_center.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/flow")
public class FlowController {
    @Autowired
    private FlowService flowService;

    @GetMapping("/past7days")
    public List<FlowDaily> getPastFlow(){
        return flowService.getPastFlow();
    }
}
